Puppet 8+ compat support: require stdlib 9, and switch to use stdlib::to_json#285
Merged
Conversation
In openvox 8, using `to_json` emits a deprecation warning: ```Puppet This function is deprecated, please use stdlib::to_json instead. at ["/etc/puppetlabs/code/modules/rsyslog/templates/modules.epp", 13]``` This patch changes the use of to_json in modules.epp so that it uses stdlib::to_json if available, and if not uses to_json. This should result in compatibility across a wide range of puppet versions, while making deprecation warnings go away :)
kenyon
requested changes
Jul 6, 2026
Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
Per @kenyon , it's now time to set the lower bound requirement for stdlib to the version that came out in 2023.
Contributor
Author
|
Thanks @kenyon, I've simplified the change to the template and updated metadata.json to require stdlib 9+ |
kenyon
reviewed
Jul 8, 2026
Co-authored-by: Kenyon Ralph <kenyon@kenyonralph.com>
kenyon
approved these changes
Jul 8, 2026
stdlib::to_json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request (PR) description
In openvox 8, using
to_jsonemits a deprecation warning:Puppet This function is deprecated, please use stdlib::to_json instead. at ["/etc/puppetlabs/code/modules/rsyslog/templates/modules.epp", 13]This patch changes the use of to_json in modules.epp so that it uses stdlib::to_json, making deprecation warnings go away :)
Stdlib 9 is now required.
This Pull Request (PR) fixes the following issues
n/a